import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:ayj_flutter_chat_app/common/configs/project_config.dart';


class VoiceBackWidget extends StatelessWidget {
  final String url;

  const VoiceBackWidget({
    super.key,
    required this.url,
  });

  @override
  Widget build(BuildContext context) {
    return Stack(
      children: <Widget>[
        Positioned.fill(
          child: AppImage.network(
            url,
            alignment: Alignment.center,
            fit: BoxFit.fitHeight,
          ),
        ),
        // 高斯模糊遮罩
        Positioned.fill(
          child: BackdropFilter(
            filter: ImageFilter.blur(sigmaX: 5.0, sigmaY: 5.0),
            child: Container(
              decoration: BoxDecoration(color: Colors.white.withOpacity(0.0)),
            ),
          ),
        ),
      ],
    );
  }
}